package com.gimi.cloud.jimi.dao.dao.product;

import java.util.List;

import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import com.gimi.cloud.jimi.dto.product.ProductSkuImgDTO;
import com.gimi.cloud.jimi.entity.product.ProductSkuImgEntity;

public interface ProductSkuImgDao extends BaseMapper<ProductSkuImgEntity> {
    int deleteByPrimaryKey(int skuImgId);

    int insert(ProductSkuImgEntity record);
    
    int deleteByProdId(String skuId);

    int insertSelective(ProductSkuImgEntity record);

//    ProductSkuImgEntity selectByPrimaryKey(int skuImgId);
//
//    List<ProductSkuImgEntity> selectBySkuId(String skuId);

    ProductSkuImgDTO selectByPrimaryKey(int skuImgId);

    List<ProductSkuImgDTO> selectBySkuId(String skuId);

    int updateByPrimaryKeySelective(ProductSkuImgEntity record);

    int updateByPrimaryKey(ProductSkuImgEntity record);
    
    @Select("select img_url as imgUrl from ec_prod_sku_img where sku_id= #{skuId} and is_del=1 order by seq")
	List<String> getSkuImgsByProdId(@Param(value = "skuId")String skuId);
}